Skip to content

feat: added tests for socket apis#1900

Merged
wenyongh merged 1 commit into
bytecodealliance:mainfrom
hritikgupta:sockettest
Mar 9, 2023
Merged

feat: added tests for socket apis#1900
wenyongh merged 1 commit into
bytecodealliance:mainfrom
hritikgupta:sockettest

Conversation

@hritikgupta

Copy link
Copy Markdown
Contributor

No description provided.

Comment thread core/iwasm/libraries/lib-socket/test/nslookup.c
Comment thread core/iwasm/libraries/lib-socket/test/nslookup.c Outdated
Comment thread core/iwasm/libraries/lib-socket/test/nslookup.c
Comment thread core/iwasm/libraries/lib-socket/test/tcp.c Outdated
Comment thread core/iwasm/libraries/lib-socket/test/tcp.c Outdated
Comment thread core/iwasm/libraries/lib-socket/test/tcp.c Outdated
Comment thread core/iwasm/libraries/lib-socket/test/tcp.c Outdated
Comment thread core/iwasm/libraries/lib-socket/test/tcp.c Outdated
Comment thread core/iwasm/libraries/lib-socket/test/tcp.c Outdated
Comment thread core/iwasm/libraries/lib-socket/test/tcp.c Outdated
Comment thread core/iwasm/libraries/lib-socket/test/tcp.c Outdated
Comment thread core/iwasm/libraries/lib-socket/test/tcp.c Outdated
Comment thread core/iwasm/libraries/lib-socket/test/tcp.c Outdated
Comment thread core/iwasm/libraries/lib-socket/test/tcp.c Outdated
Comment thread core/iwasm/libraries/lib-socket/test/tcp.c Outdated
Comment thread core/iwasm/libraries/lib-socket/test/tcp.c Outdated
Comment thread core/iwasm/libraries/lib-socket/test/nslookup.c
Comment thread core/iwasm/libraries/lib-socket/test/tcp.c Outdated
@lum1n0us

Copy link
Copy Markdown
Contributor

We'd better not check in a binary file (core/iwasm/libraries/lib-socket/test/tcp)

@lum1n0us

Copy link
Copy Markdown
Contributor

@loganek @wenyongh we usually keep similar code in samples/socket-api, is it better if we also store above code there?

@wenyongh

Copy link
Copy Markdown
Collaborator

We'd better not check in a binary file (core/iwasm/libraries/lib-socket/test/tcp)

Yes, don't check in wasm binary file here.

@wenyongh

Copy link
Copy Markdown
Collaborator

@loganek @wenyongh we usually keep similar code in samples/socket-api, is it better if we also store above code there?

No, had better move the source files into samples/socket-api/src, rename the sample files with suitable names, and update document about how to run the samples and what the output should be.

@hritikgupta Could you add the files as samples in samples/socket-api/src and update the document and build scripts? Thanks.

@loganek

loganek commented Jan 27, 2023

Copy link
Copy Markdown
Contributor

@wenyongh , @lum1n0us so the intention of this is to run those tests as part of WASI test suite. I don't have strong opinion about where to put those tests, but my preference would be to keep examples and tests separate (even though there's some overlap).

@loganek

loganek commented Jan 27, 2023

Copy link
Copy Markdown
Contributor

@hritikgupta could you also add integration with wasi testsuite to this PR? I think the change might be a bit confusing without that.

@wenyongh

Copy link
Copy Markdown
Collaborator

@wenyongh , @lum1n0us so the intention of this is to run those tests as part of WASI test suite. I don't have strong opinion about where to put those tests, but my preference would be to keep examples and tests separate (even though there's some overlap).

Got it, if they are only tests, it should be good to put them here, and yes, had better add them to CI test.

@hritikgupta

Copy link
Copy Markdown
Contributor Author

We'd better not check in a binary file (core/iwasm/libraries/lib-socket/test/tcp)

Yes, don't check in wasm binary file here.

Right right, this got committed accidentally while I was testing the script, will remove this as a part of the commit addressing the remaining review comments.

Comment thread .github/workflows/compilation_on_android_ubuntu.yml Outdated
Comment thread core/iwasm/libraries/lib-socket/test/build.sh Outdated
Comment thread core/iwasm/libraries/lib-socket/test/tcp.c Outdated
Comment thread core/iwasm/libraries/lib-socket/test/tcp.c Outdated
Comment thread core/iwasm/libraries/lib-socket/test/nslookup.c Outdated
Comment thread .github/workflows/compilation_on_android_ubuntu.yml
Comment thread .github/workflows/compilation_on_android_ubuntu.yml Outdated
Comment thread core/iwasm/libraries/lib-socket/test/build.sh Outdated
Comment thread core/iwasm/libraries/lib-socket/test/nslookup.c Outdated
Comment thread core/iwasm/libraries/lib-socket/test/tcp_udp.c Outdated
Comment thread core/iwasm/libraries/lib-socket/test/build.sh
Comment thread core/iwasm/libraries/lib-socket/test/nslookup.c
Comment thread core/iwasm/libraries/lib-socket/test/nslookup.c Outdated
Comment thread core/iwasm/libraries/lib-socket/test/tcp_udp.c Outdated
Comment thread core/iwasm/libraries/lib-socket/test/tcp_udp.c
Comment thread core/iwasm/libraries/lib-socket/test/tcp_udp.c Outdated
Comment thread core/iwasm/libraries/lib-socket/test/nslookup.c Outdated
Comment thread core/iwasm/libraries/lib-socket/test/nslookup.c
Comment thread core/iwasm/libraries/lib-socket/test/nslookup.c
Comment thread core/iwasm/libraries/lib-socket/test/build.sh
Comment thread core/iwasm/libraries/lib-socket/test/tcp_udp.c
Comment thread .github/workflows/compilation_on_android_ubuntu.yml
@hritikgupta hritikgupta force-pushed the sockettest branch 4 times, most recently from 0e65441 to c34cabc Compare March 8, 2023 20:03
@hritikgupta

Copy link
Copy Markdown
Contributor Author

@wenyongh / @loganek — addressed the changes, does this look good to merge?

Comment thread core/iwasm/libraries/lib-socket/test/nslookup.c
]
wasi_sdk_release:
[
"https://github.com/WebAssembly/wasi-sdk/releases/download/wasi-sdk-19/wasi-sdk-19.0-linux.tar.gz",

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The same change was already added in #1963 so now no need to add this line here after it was merged.
https://github.com/bytecodealliance/wasm-micro-runtime/blob/main/.github/workflows/compilation_on_android_ubuntu.yml#L462

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

removed

cd /opt
sudo wget ${{ matrix.wasi_sdk_release }}
sudo tar -xzf wasi-sdk-19.0-*.tar.gz
sudo mv wasi-sdk-19.0 wasi-sdk

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

NM=/opt/wasi-sdk/bin/llvm-nm \
CC=/opt/wasi-sdk/bin/clang \
THREAD_MODEL=posix
working-directory: core/deps

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same as above

@wenyongh

wenyongh commented Mar 9, 2023

Copy link
Copy Markdown
Collaborator

@wenyongh / @loganek — addressed the changes, does this look good to merge?

It is good to me, but need to remove the duplicated changes with #1963.

@wenyongh wenyongh left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@wenyongh wenyongh merged commit ff38877 into bytecodealliance:main Mar 9, 2023
wenyongh added a commit to wenyongh/wasm-micro-runtime that referenced this pull request Mar 9, 2023
vickiegpt pushed a commit to vickiegpt/wamr-aot-gc-checkpoint-restore that referenced this pull request May 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants